package com.kingmed.kmss.admin.modules.ums.model;

import com.baomidou.mybatisplus.annotation.*;
import com.kingmed.kmss.common.domain.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 后台菜单表(加字段，字段1=菜单类型，菜单，按钮，字段2=权限代码)
 * </p>
 */
@Data
@TableName("ums_menu")
@ApiModel(value = "UmsMenu对象", description = "后台菜单表")
public class UmsMenu extends BaseEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty("父级ID")
    private Long parentId;

    @ApiModelProperty("创建时间")
    private Date createTime;

    @ApiModelProperty("菜单名称")
    @NotEmpty
    private String title;

    @ApiModelProperty("菜单级数")
    private Integer level;

    @ApiModelProperty("菜单排序")
    private Integer sort;

    @ApiModelProperty("前端名称")
    @NotEmpty
    private String name;

    @ApiModelProperty("前端名称中文")
    private String nameCn;

    @ApiModelProperty("前端图标")
    private String icon;

    @ApiModelProperty("前端隐藏")
    private Integer hidden;

    @ApiModelProperty("菜单路由地址")
    @NotEmpty
    private String path;

    @ApiModelProperty("只有一级菜单是否显示：1=是")
    @NotNull
    private Integer showParent;

    @ApiModelProperty("是否在菜单栏显示：1=是")
    @NotNull
    private Integer showLink;

    @ApiModelProperty("是否需要缓存：1=是")
    private Integer needCache;

    @ApiModelProperty("删除标记")
    @TableField
    @TableLogic(value = "0", delval = "1")
    private Integer deleteFlag;
}
